#define  _CRT_SECURE_NO_WARNINGS
#include "SList.h"

void SLTNodeTest()
{
	SLTNode* plist = NULL;

	//SLTPushBack(&plist, 1);
	//SLTPushBack(&plist, 2);
	//SLTPushBack(&plist, 3);
	//SLTPushBack(&plist, 4);
	//
	//SLTPrint(plist);

	SLTPushFront(&plist, 4);
	SLTPushFront(&plist, 3);
	SLTPushFront(&plist, 2);
	SLTPushFront(&plist, 1);
	SLTPrint(plist);

	//SLTPopBack(&plist);
	//SLTPopBack(&plist);
	//SLTPopBack(&plist);
	//SLTPopBack(&plist);
	//SLTPrint(plist);

	//SLTPopFront(&plist);
	//SLTPopFront(&plist);
	//SLTPopFront(&plist);
	//SLTPopFront(&plist);
	//SLTPrint(plist);

	SLTNode* find = SLTFind(&plist, 3);
	//if (find != NULL)
	//{
	//	printf("1\n");
	//}
	//else
	//{
	//	printf("0\n");
	//}
	
	//SLTInvertFront(&plist, find, 9);
	//SLTPrint(plist);

	//SLTInvertBack(find, 9);
	//SLTPrint(plist);

	//SLTErase(&plist, find);
	//SLTPrint(plist);

	//SLTEraseBack(find);
	//SLTPrint(plist);

	SListDestroy(&plist);
	SLTPrint(plist);
}

int main()
{
	SLTNodeTest();
	return 0;
}